package com.fypg.module.medical.controller.app.doctorapplication;

import com.fypg.framework.common.pojo.CommonResult;
import com.fypg.module.medical.controller.app.doctorapplication.vo.AppDoctorApplicationReqVO;
import com.fypg.module.medical.controller.app.doctorapplication.vo.AppDoctorApplicationRespVO;
import com.fypg.module.medical.service.doctorapplication.DoctorApplicationService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;

import static com.fypg.framework.common.pojo.CommonResult.success;

@Tag(name = "用户 APP - 医生应用列表")
@RestController
@RequestMapping("/api/v1/home")
@Validated
public class AppDoctorApplicationController {

    @Resource
    private DoctorApplicationService doctorApplicationService;

    @GetMapping("/GetApplicationList")
    @Operation(summary = "获取应用程序列表")
    public CommonResult<List<AppDoctorApplicationRespVO>> getDoctorApplicationList(@Valid AppDoctorApplicationReqVO reqVO) {
        return success(doctorApplicationService.getDoctorApplicationList(reqVO));
    }

}
